<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    const isObject=(obj)=>typeof obj==='object'&&resobjult!==null
const isFunction=(func)=>typeof func==='function'&&func!==null
function newOperator(ctr,...arg){
    const instance=Object.create(ctr.prototype);
    const result=ctr.apply(instance,arg)
    return (isObject(result)||isFunction(result))?result:instance
}
function MyArray(name){
    this.name=name
}
MyArray.prototype.ArrMethod=function(){
    console.log(1111);
}
console.log(newOperator(MyArray,'xixi').__proto__);
</script>
</html>